package com.wisecoach.gatewayplus.transaction;

/**
 * {@code @author:} wisecoach
 * {@code @date:} 2023/9/30 下午3:23
 * {@code @version:} 1.0.0
 */


public class DefaultTransactionStatus implements TransactionStatus {

    private final String id;
    private final TransactionStrategy strategy;
    private final boolean isNewTransaction;

    public DefaultTransactionStatus(String id, TransactionStrategy strategy, boolean isNewTransaction) {
        this.id = id;
        this.strategy = strategy;
        this.isNewTransaction = isNewTransaction;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public TransactionStrategy getStrategy() {
        return strategy;
    }

    @Override
    public boolean isNewTransaction() {
        return isNewTransaction;
    }
}
